import axios from "@/utils/request";

export function addCategory(params){
    return axios({
        method:"post",
        url:"/category",
        data:params
    })
}

export function deleteCategory(params){
    return axios({
        method:"delete",
        url:"/category",
        data:params
    })
}

export function updateCategory(params){
    return axios({
        method:"put",
        url:"/category",
        data:params
    })
}

export function selectCategory(params){
    return axios({
        method:"get",
        url:"/category",
        params: {
            pageNum:params.pageNum,
            pageSize:params.pageSize,
            search:params.search,
        }
    })
}

export function selectAllCategory(params){
    return axios({
        method:"get",
        url:"/category/selectAll",
        data:params
    })
}